home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-11 | 11.9 KB | 197 lines | [TEXT/ttxt] |
- This file reports the timing and accuracy of all your video screens, as
- measured by TimeVideo, a component of the VideoToolbox. TimeVideo runs on all
- Macs, requiring only System 6.05 or better. To quickly test a large number of
- computers, run TimeVideo from a floppy disk; all the results will accumulate
- in a single results file. TimeVideo is free, and may be freely distributed.
- You can get the latest version from:
- ftp://mirror.apple.com/mirrors/info-mac/cfg/time-video-376.hqx
-
- THE VIDEO TOOLBOX
- The VideoToolbox is a collection of two hundred C subroutines and several demo
- and utility programs that I and others have written to do visual psychophysics
- with Macintosh computers. It is fully compatible with 680x0 and PowerPC Macs
- and with Metrowerks CodeWarrior C and Symantec C compilers. It's free and may
- not be sold without permission. It should be useful to anyone who wants to
- present accurately specified visual stimuli or use the Mac for psychometric
- experiments. The text file "Video synch" discusses all the ways of
- synchronizing programs to video displays and the many pitfalls to avoid. The
- TimeVideo application checks out the timing of all video devices in
- anticipation of their use in critical real-time applications, e.g. movies or
- lookup table animation. Low-level routines control video timing and lookup
- tables, display real-time movies, and implement the luminance-control
- algorithms suggested by Pelli and Zhang (1991). (D.G. Pelli and L. Zhang,
- 1991, "Accurate control of contrast on microcomputer displays." Vision
- Research, 31, 1337-1350. Reprints are available.) In particular,
- GetPixelsQuickly and SetPixelsQuickly peek and poke pixels in bitmaps and
- pixmaps, CopyBitsQuickly and CopyWindows faithfully copy between bit/pixmaps
- and the screen, WindowToEPS saves an image to disk, for later printing or
- incorporation into a document, and SetEntriesQuickly and GDSetEntries load the
- screen's color lookup table, all without any of QuickDraw's color
- translations. High-level routines help analyze psychophysical experiments
- (e.g. graphing or maximum-likelihood fitting of psychometric data). Assign.c
- is a runtime C interpreter for C assignment statements, which is useful for
- controlling experiments and sharing calibration data. Many of the routines are
- Mac-specific, but some very useful routines, e.g. the luminance-control,
- statistics, maximum-likelihood fitting algorithms, and the runtime interpreter
- are written in Standard C and will work on any computer. Documentation is in
- the source files themselves. This collection has been continually updated
- since 1991. You can download the latest version of "video-toolbox" from a
- public archive, e.g.:
- ftp://sumex-aim.stanford.edu/info-mac/dev/lib/
- ftp://mirror.apple.com/mirrors/info-mac/dev/lib/
- ftp://mirrors.aol.com/pub/info-mac/dev/lib/
- ftp://src.doc.ic.ac.uk/packages/mac/info-mac/dev/lib/
- ftp://ftp.stolaf.edu/pub/macpsych/
- CompuServe://MacDev forum/Library 4 "C and Pascal"/VIDEOT.SEA
- Or you can request a file by email; for instructions send a query to
- Info-Mac-Request@sumex-aim.stanford.edu.
-
- To get future versions automatically, just send me your name and email
- address. Each time I post a new version of the VideoToolbox to the Info-Mac
- Archives, I email a copy to everyone on the subscription list; there are
- currently over 170 subscribers. (Let me know if you prefer notification only,
- without the 3 MB enclosure.)
- Denis Pelli, denis@psych.nyu.edu, Psychology Dept., New York University, 6
- Washington Place, New York, NY 10003, USA
-
-
- TIME VIDEO
- Other than reading and writing pixels, all access to a video device normally
- goes through the software video driver. (You can use VideoToolbox
- SetEntriesQuickly.c to bypass the video driver of a few devices, but I don't
- recommend that, except as a last resort, because your program will then only
- work with the few video devices that SetEntriesQuickly.c supports.) The video
- driver is normally supplied in ROM on the video card or, for built-in video,
- in the computer's ROM. (Apparently, new PCI drivers can simply be tossed onto
- the System Folder.) Many drivers have subtle bugs that TimeVideo has uncovered
- and documented. A complete list of all known video driver bugs appears in the
- "Video bugs" document included in the VideoToolbox archive described above.
- Please send new bugs to denis@psych.nyu.edu
-
- For each video card, TimeVideo measures the video frame rate, frequency of VBL
- interrupts (ought to be one per frame), how long it takes to load the clut
- (ought to be one frame or less), and how much of the screen you can fill with
- a real-time one-image-per-frame movie shown by CopyBits() or
- CopyBitsQuickly(). It then performs a random write-then-read test of the Color
- Lookup Table (clut). This tests the clut memory hardware and the software used
- to write and read the clut. We test writing by GDSetEntries(), which makes a
- cscSetEntries call to the video driver, and, if possible, we also test writing
- by SetEntriesQuickly(), which accesses the hardware directly.
- (SetEntriesQuickly supports only a few video cards.) In either case, the clut
- is read by GDGetEntries, which makes a cscGetEntries call to the video driver.
- The testing is thorough; many video devices fail at least part of the test.
- All the driver errors uncovered to date appear in the VideoToolbox "Video
- bugs" text file, and have been reported to the video card's manufacturer. Add
- your results by emailing this file to denis@psych.nyu.edu
-
- Happily, we don't know of any cases of errors in cscSetEntries itself, and
- we've never run across a hardware failure of the CLUT memory. Our experience
- is that errors in the cscSetEntries/cscGetEntries write-then-read test of the
- CLUT occur in two ways:
- 1. The driver does not implement cscSetGamma and the fixed gamma table is not
- the identity transformation, i.e. "uncorrected gamma table". TimeVideo always
- calls cscSetGamma, requesting an identity transform. In all drivers, the RGB
- values supplied in a cscSetEntries call are transformed by the gamma table
- before being loaded into the CLUT. The presence of a non-identity gamma table
- is usually obvious from a glance at the color matrix, since the gains in the
- matrix will exceed 1 by about twice the fractional rms error indicated by ±%.
- 2. The CLUT is set correctly, but the driver incorrectly implements
- cscGetEntries. Bugs in cscGetEntries are usually obvious from a glance at the
- color matrix, e.g. nonzero gains off the diagonal, or the pattern of errors.
-
- The video driver on the PowerMac 7500 and 8500 supresses the VBL interrupt
- while it's loading the CLUT, so any VBL-frame-counting task will miss an
- interrupt each time you call cscSetEntries to load the clut. Calling
- cscSetEntries once per frame to synchronize your code with the frame should
- still work fine, but it'll be slightly tricky to check for overrun (i.e.
- taking too long between cscSetEntries calls), since a simple
- VBL-interrupt-based frame counter will run differently on different Macs.
-
- Errors reported by TimeVideo are usually due to bugs in the video driver
- software in the ROM of the video card (or built-in video device). If the bug
- will interfere with your experiments, then to use the card (or built-in video)
- you must either fix/replace the driver or bypass the driver, using
- SetEntriesQuickly to access the hardware directly (if SetEntriesQuickly
- supports it). I suggest that you try replacing the driver, because this will
- keep your software hardware-independent. The VideoToolbox "Video synch"
- document explains how to fix the the Mac IIci video driver, patching or
- replacing the buggy version 0 .Display_Video_Apple_RBV1 driver by copying the
- bug-free version 1 of the same driver from the Mac IIsi. It is very likely
- that an analogous approach could be used to fix/replace the buggy version 0,
- 1, and 2 .Display_Video_Apple_DAFB drivers in the Quadra 700, 750, and 900, by
- the bug-free version 3 or 5 of that driver in the Centris 650 or the LC 475.
- And please report your bugs; the bug-free revised drivers are probably the
- result of our past bug reports.
-
- GLOSSARY
- A video frame is a complete refresh of your video screen. (With interlacing it
- takes two fields to do a complete refresh, i.e. a frame, but graphics displays
- usually are not interlaced and have a single field per frame.) To show a
- movie, you will want to reload the image once per frame; the table shows how
- big that image can be, as a fraction of the screen area, and still be reloaded
- once per frame. (Some video cards have multiple video "pages"--call
- GDGetPageCnt()--that can be switched by calling GDSetPageDrawn() and
- GDSetPageShown().) A "VBL" interrupt is produced by your video card, nominally
- once per frame, but some video cards produce more, which is poor, but not
- serious. (The VBLInstall.c program will deal with it.) Suppressed interrupts
- during clut updates are bad. It means that the driver disables the VBL
- interrupt for too long while it's loading the clut. This will throw off any
- interrupt-based attempt to count frames. (The clut is the color lookup table
- of your video card.) Lookup table animation, e.g. for temporal modulation of
- contrast, requires that you reload the clut once per frame, so it's very
- important that this be fast enough. The first call to SetEntriesQuickly() for
- each device is slow--a cache is filled; the reported times are for subsequent
- calls. Each video card can be in "Color" or "Gray" mode, as set by the Control
- Panel:Monitors or the Macintosh Toolbox call SetDepth(). In "Gray" mode all
- colors are transformed to luminance-equivalent grays. This is done by the
- video driver, when loading the clut, but only if the pixelSize≤8. TimeVideo
- does a linear regression on the results of write-then-read tests of the CLUT
- to measure the driver's color transformation matrix. It reports the matrix if
- it is other than the identity transformation:
- (ROut) (1 0 0) (RIn)
- (GOut)=(0 1 0)x(GIn)
- (BOut) (0 0 1) (BIn)
- The clut tests try loading the clut serially, one entry at a time, and all at
- once; some video drivers fail the serial test. For more explanation see the
- text file called "Video synch" on the VideoToolbox disk.
-
- "cscSetEntries ... NAN ... frames"= the driver refuses to load the CLUT.
- "ok"= passed all tests.
- "!gray"= passed the color test, but is supposed to be in gray mode.
- "!color"= passed the gray test, but is supposed to be in color mode.
- "!serial"= passed when loaded all at once, but failed when loaded serially.
- "bad"= read did not equal write and the error is reported explicitly.
- We know that SetEntriesQuickly is "!serial" on the Quadra, alas.
-
- This is a SimpleText document using the Monaco font to line up the
- columns properly.
-
- TimeVideo version 3.7.6
- Wednesday, September 11, 1996.
- Compiled by Metrowerks CodeWarrior C 9.00 for PowerPC, 4B int and 8B double.
- Using RAM Doubler.
- MF Colin Dalziel's PowerMac 6100/60, ppc601, System 7.5.3. GestaltMachineType
- 75.
-
- PowerMac 6100/60 "Built-In DRAM Video" (.Display_Video_Apple_Sonora version 7)
- 8-bit dacs. 640x480 pixels.
- pixel size 1 2 4 8 16 bits
- pages 1 1 1 1 1
- mode 0x80 0x81 0x82 0x83 0x84
- frame rate 66.5 66.6 66.5 66.5 66.5 Hz
- interrupts per frame 1.0 1.0 1.0 1.0 1.0
- CopyBits movie size 4.55 2.50 1.27 0.58 0.22 screen
- CopyBitsQuickly movie size 3.69 2.23 1.19 0.57 0.22 screen
- CopyBits data rate 11.09 12.19 12.33 11.30 8.61 MB/s
- CopyBitsQuickly data rate 9.00 10.88 11.63 11.20 8.57 MB/s
- cscSetEntries duration 1.00 1.00 1.00 1.00 1.00 frames
- cscSetEntries suppresses ints.for 0.0 0.0 -0.0 0.0 -0.0 frames
- GDSetEntriesHighPriority duration 1.00 1.00 1.00 1.00 1.00 frames
- color: cscSetEntries test ok ok ok ok ok
- gray: cscSetEntries test ok ok ok ok ok
- (ROut± 0.4%) (0.30 0.59 0.11) (RIn)
- (GOut± 0.4%)=(0.30 0.59 0.11)x(GIn)
- (BOut± 0.4%) (0.30 0.59 0.11) (BIn)
-
-
-